import request from "@/utils/request";

// 查询博客相册列表
export function listAlbum(query) {
  return request({
    url: "/blog/album/list",
    method: "get",
    params: query,
  });
}
// 查询博客相册列表
export function queryAllList() {
  return request({
    url: "/blog/album/queryAllList",
    method: "get",
  });
}

// 查询博客相册详细
export function getAlbum(albumId) {
  return request({
    url: "/blog/album/" + albumId,
    method: "get",
  });
}

// 新增博客相册
export function addAlbum(data) {
  return request({
    url: "/blog/album",
    method: "post",
    data: data,
  });
}

// 修改博客相册
export function updateAlbum(data) {
  return request({
    url: "/blog/album",
    method: "put",
    data: data,
  });
}

// 修改相册状态
export function changeAlbumStatus(albumId, status) {
  const data = {
    albumId,
    status,
  };
  return request({
    url: "/blog/album/changeStatus",
    method: "put",
    data: data,
  });
}

// 删除博客相册
export function delAlbum(albumId) {
  return request({
    url: "/blog/album/" + albumId,
    method: "delete",
  });
}
